# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-odict
_pkgname=odict
_pyver=3.13
pkgver=1.9.0
pkgrel=7
pkgdesc='Ordered dictionary.'
arch=('any')
url='https://pypi.org/project/odict/'
license=('PSF')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('edb70fbda0a917e49003e1ee8e7042133a80e6d7d04460cd8d593a7e257b33163c29292ea0eed12fa8c096472d5726bcd62f85d9d737387880d13b428c5c68c5')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  chmod 644 \
    "$pkgdir/usr/lib/python$_pyver/site-packages/$_pkgname-$pkgver-py$_pyver.egg-info/"*
}

